package com.umakr.ax.security.service;

import com.umakr.ax.security.model.Role;
import com.umakr.ax.security.mapper.RoleMapper;
import com.umakr.ax.core.base.BaseService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 角色 服务实现类
 * </p>
 *
 * @author gx
 * @since 2017-04-25
 */
@Service
public class RoleService extends BaseService<RoleMapper, Role>{
    /**
     * 根据用户id查找该用户拥有的角色。
    * @since 2017/4/25 15:53
    * @param userId 用户id
    */
    public List<Role> queryRoleByUserId(Long userId){
        return baseMapper.queryRoleByUserId(userId);
    }
}
